package by.vitia.examples.handler_opz;

import java.util.LinkedList;
//import java.util.InputMismatchException;

public class Stack<T> {
		// private void Stack <T> () {};
		private LinkedList<T> Storage = new LinkedList<T>();

		public void push(T v) {
			Storage.addFirst(v);
		}

		public T peek() {
			return Storage.getFirst();
		}

		public T pop() {
			return Storage.removeFirst();
		}

		public boolean isEmpty() {
			return Storage.isEmpty();
		}

		public String toString() {
			return Storage.toString();
		}
}
